package com.rainbowred.common.util;

import org.springframework.stereotype.Component;

import java.util.UUID;

/**
 * @Description: pojo工具
 * @Author: pwb
 * @Date: Created in 2022/1/23 15:54
 */
@Component
public class PojoUtil {

    private static final int UUIDLENGTH = 10;

    /**
     * 生成uuid
     * @return
     */
    public static String getUUID(){
        String uuid = UUID.randomUUID().toString();
        int length = uuid.length();
        int index = length - 1;
        return uuid.substring(index - UUIDLENGTH, index).toUpperCase();
    }



}
